home *** CD-ROM | disk | FTP | other *** search
- CPLXOPS(3C) Last changed: 3-22-99
-
-
- NNAAMMEE
- ccoommpplleexx__ooppeerraattoorrss - Operators for the C++ complex math library
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ccoommpplleexx..hh>>
-
- ccllaassss ccoommpplleexx {{
-
- ppuubblliicc::
- ffrriieenndd ccoommpplleexx ooppeerraattoorr++((ccoommpplleexx,, ccoommpplleexx));;
- ffrriieenndd ccoommpplleexx ooppeerraattoorr--((ccoommpplleexx));;
- ffrriieenndd ccoommpplleexx ooppeerraattoorr--((ccoommpplleexx,, ccoommpplleexx));;
- ffrriieenndd ccoommpplleexx ooppeerraattoorr**((ccoommpplleexx,, ccoommpplleexx));;
- ffrriieenndd ccoommpplleexx ooppeerraattoorr//((ccoommpplleexx,, ccoommpplleexx));;
-
- ffrriieenndd iinntt ooppeerraattoorr====((ccoommpplleexx,, ccoommpplleexx));;
- ffrriieenndd iinntt ooppeerraattoorr!!==((ccoommpplleexx,, ccoommpplleexx));;
-
- vvooiidd ooppeerraattoorr++==((ccoommpplleexx));;
- vvooiidd ooppeerraattoorr--==((ccoommpplleexx));;
- vvooiidd ooppeerraattoorr**==((ccoommpplleexx));;
- vvooiidd ooppeerraattoorr//==((ccoommpplleexx));;
-
- }};;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems (--oo3322 ABI only)
-
- DDEESSCCRRIIPPTTIIOONN
- NOTE: This man page applies only to the --oo3322 ABI. The MIPSpro
- --nn3322 and --6644 ABIs support the template-based complex class which
- is included in the C++ standard library and is automatically
- loaded by the MIPSpro C++ compiler. The --llmm option must still be
- used to link the math library.
-
- The basic arithmetic operators, comparison operators, and assignment
- operators are overloaded for complex numbers. The operators have
- their conventional precedences. In the following descriptions for
- ccoommpplleexx operators,
- - _x, _y, and _z are of type ccoommpplleexx.
-
- Arithmetic operators:
-
- _z == _x ++ _y Returns a ccoommpplleexx which is the arithmetic sum of
- complex numbers _x and _y.
-
- _z == --_x Returns a ccoommpplleexx which is the arithmetic negation of
- complex number _x.
-
- _z == _x -- _y Returns a ccoommpplleexx which is the arithmetic difference of
- complex numbers _x and _y.
-
- _z == _x ** _y Returns a ccoommpplleexx which is the arithmetic product of
- complex numbers _x and _y.
-
- _z == _x // _y Returns a ccoommpplleexx which is the arithmetic quotient of
- complex numbers _x and _y.
-
- Comparison operators:
-
- _x ==== _y Returns non-zero if complex number _x is equal to
- complex number _y; returns 0 otherwise.
-
- _x !!== _y Returns non-zero if complex number _x is not equal to
- complex number _y; returns 0 otherwise.
-
- Assignment operators:
-
- _x ++== _y Complex number _x is assigned the value of the
- arithmetic sum of itself and complex number _y.
-
- _x --== _y Complex number _x is assigned the value of the
- arithmetic difference of itself and complex number _y.
-
- _x **== _y Complex number _x is assigned the value of the
- arithmetic product of itself and complex number _y.
-
- _x //== _y Complex number _x is assigned the value of the
- arithmetic quotient of itself and complex number _y.
-
- WWAARRNNIINNGGSS
- The assignment operators do not produce a value that can be used in an
- expression. That is, the following construction is syntactically
- invalid:
-
- complex x, y, z;
- .
- x = ( y += z );
-
- Whereas, the following is valid:
-
- x = ( y + z );
-
- x = ( y == z );
-
- SSEEEE AALLSSOO
- ccoommpplleexx(3C), ccaarrttppooll(3C), ccppllxxeerrrr(3C), ccppllxxeexxpp(3C), ccppllxxttrriigg(3C)
-
- This man page is available only online.
-